#ifndef C3DTrackBallCam_____
#define C3DTrackBallCam_____

#include "Vector2f.h"
#include "Vector3f.h"
#include "PerspectiveViewVolume.h"
#include "Quaternion.h"

class C3DArcBallCam
{
	// Notes: designed for a 3D arc ball camera effect

  public:

	//-------------------------------------------------------------------------
	// members
	//-------------------------------------------------------------------------

	vector3f				m_vCamPos, m_vLensPos;
	CPerspectiveViewVolume	m_ViewVol;
	CQuaternion				m_qRotation, m_qCamera;
	matrix44f				m_mRotation;

	//-------------------------------------------------------------------------
	// constructors
	//-------------------------------------------------------------------------

	C3DArcBallCam();
	
	//-------------------------------------------------------------------------
	// functions
	//-------------------------------------------------------------------------

	void ZoomIn();
	void ZoomOut();
	void MoveCam();
	void ApplyQuaternionRotationFromMouse(vector2f vFrom, vector2f vTo);
	void ApplyQuaternionRotationFromKeypad(UINT nChar, float fRotationAngle);
	vector3f MapCursorPositionOnSphere(float x, float y);

};

#endif